<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=s, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* 代码初始化 */
    *{
      margin: 0;
      padding: 0;
    }
    li{
      list-style: none;
    }
    /* 代码主体 */
    body{
      width: 100vw;
      height: 100vh;
      background: linear-gradient(to right, #39bcf2 0%,#39bcf2 50%,#18354a 50%,#18354a 100%);
    }
    .login_box{
      width: 1000px;
      height: 430px;
      /* box-shadow: 0 0 6px #fff; */
      /* 绝对定位实现水平垂直居中 */
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%,-50%);
    }
    /* 左侧 */
    .box_left{
      width: 240px;
      height: 280px;
      padding: 40px;
      background: #18354a;
      /* 绝对定位 */
      position: absolute;
      left: 0;
      top: 35px;
      color: #fff;
    }
    .box_left h2{
      line-height: 21px;
      font-size: 16px;
      margin-bottom: 26px;
    }
    .box_left ul li{
      line-height: 25px;
      margin-bottom: 26px;
    }
    .box_left ul li img{
      width: 25px;
      height: 25px;
      vertical-align: bottom;
      margin-right: 5px;
    }

    /* 右侧 */
    .box_right{
      width: 870px;
      height: 430px;
      background: #fff;
      float: right;
    }
    .box_right form{
      width: 600px;
      height: 360px;
      /* background: lawngreen; */
      float: right;
      margin-top: 35px;
      margin-right: 40px;
    }
    .box_right form h1{
      line-height: 20px;
      color: #18354a;
      font-size: 20px;
      margin-bottom: 30px;
    }
    .box_right form ul{
      /* height: 310px; */
      /* background: lightblue; */
    }
    .box_right form ul li{
      width: 282px;
      height: 26px;
      border-bottom: 1px solid #777;
      float: left;
      /* 子绝父相 */
      position: relative;
      margin-bottom: 35px;
      
    }
    .box_right form ul::after{
      content: "";
      display: block;
      clear: both;
    }
    /* 选择器小技巧 */
    .box_right form ul li:nth-of-type(2n){
      margin-left: 36px;
    }
    .box_right form ul li input{
      width: inherit;
      height: inherit;
      border: none;
      outline: none;
      color: #666;
    }
    .box_right form ul li input+span{
      position: absolute;      
      left: 0;
      top: 0;
      line-height: 26px;
      /* 鼠标穿透事件 */
      pointer-events: none;
      /* 过渡 */
      transition: all .3s;
      color: #666;
    }
    /* 伪类选择器+兄弟元素选择器配合 */
    .box_right form ul li input:focus+span,
    .box_right form ul li input:valid+span{
      top: -20px;
      font-size: 12px;
      color: #000;
    }
    

    /* 最后一个li */
    .box_right form ul li:last-child{
      width: 100%;
      height: 60px;
      padding: 5px 0;
    }
    .box_right form ul li:last-child textarea{
      resize: none;
      outline: none;
      width: inherit;
      height: 60px;
      border: none;
      color: #666;
    }
   
    .box_right form ul li:last-child textarea+span{
      position: absolute;      
      left: 0;
      top: 0;
      line-height: 26px;
      /* 鼠标穿透事件 */
      pointer-events: none;
      /* 过渡 */
      transition: all .3s;
      color: #666;
    }
    .box_right form ul li:last-child textarea:focus+span,
    .box_right form ul li:last-child textarea:valid+span{
      top: -18px;
      font-size: 12px;
      color: #000;
    }
    /* 提交按钮 */
    .box_right form ul+button{
      width: 90px;
      height: 40px;
      border: none;
      outline: none;
      color: #fff;
      font-size: 14px;
      background: #18354a;
      cursor: pointer;
    }
  </style>
</head>
<body>
    <!-- 登录块 -->
    <div class="login_box">
      <!-- 左侧 -->
      <div class="box_left">
        <h2>联系我们</h2>
        <ul>
          <li>
            <img src="./imgs/address.png" alt="">
            三江社区三江悦府三江公园
          </li>
          <li>
            <img src="./imgs/email.png" alt="">
            wangwang@kanzhun.com
          </li>
          <li>
            <img src="./imgs/mobile.png" alt="">
            010-990898-2387872
          </li>
        </ul>
      </div>
      <!-- 右侧 -->
      <div class="box_right">
        <!-- 表单 -->
        <form>
          <h1>在线留言</h1>
          <ul>
            <li>
              <input type="text" required name="" id="">
              <span>姓名</span>
            </li>
            <li>
              <input type="text" required name="" id="">
              <span>年龄</span>
            </li>
            <li>
              <input type="text" required name="" id="">
              <span>邮箱</span>
            </li>
            <li>
              <input type="tel" required name="" id="">
              <span>手机号</span>
            </li>
            <li>
              <textarea name="" id="" cols="30" rows="10" required></textarea>
              <span>请输入您的消息内容</span>
            </li>
          </ul>
          <button>提交</button>
        </form>
      </div>
    </div>
</body>
</html>